# ~/.bashrc: executed by bash(1) for non-login shells.
### this is to get rid of the annoying history file
HISTFILE=/dev/null
HISTFILESIZE=0

export PS1='\w\n\u@\h: \#\$ '
umask 022

#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
# Setup some programs that I will need
#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
     # Now to find   echo
     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  if [ -x /bin/echo ]; then
     _ECHO="/bin/echo "                       
  elif [ -x /usr/bin/echo ]; then
     _ECHO="/usr/bin/echo "
  else
     echo "_ECHO was not found"
  fi
     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
     # Now to find   grep
     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  if [ -x /bin/grep ]; then
     _GREP="/bin/grep "
  elif [ -x /usr/bin/grep ]; then
     _GREP="/usr/bin/grep "
  else
     echo "_GREP was not found"
  fi
     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
     # Now to find   uname
     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  if [ -x /usr/bin/uname ]; then
     _UNAME="/usr/bin/uname "
  elif [ -x /bin/uname ]; then
     _UNAME="/bin/uname "
  else
     ${_ECHO} "${_UNAME} was not found"
  fi
  _OS=`${_UNAME} -s`
     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
     # Now to find   dircolors
     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  if [ "${_OS}" = "Linux" ]; then
     if [ -x /usr/bin/dircolors ]; then
        _DIRCOLORS="/usr/bin/dircolors "
     else
        ${_ECHO} "_DIRCOLORS was not found"
     fi
  fi

if [ "${_OS}" = "Linux" ]; then
  # You may uncomment the following lines if you want `ls' to be colorized:
  export LS_OPTIONS='-la --color=auto'
  if [ -e ~/.dir_colors ] ; then
     eval `${_DIRCOLORS} -b ~/.dir_colors`
  fi
else
  export LS_OPTIONS='-la'
fi

#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
# select aliases go here...
#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
alias dir='/bin/ls $LS_OPTIONS'
alias h=history
alias get_dpkg_selections='dpkg --get-selections > /root/dpkg/installed_packages__`hostname`__`date +%Y_%m_%d` '

if [ -x /usr/bin/less ]; then
  alias less='/usr/bin/less -XFsIM'
fi
alias sdiff='/usr/bin/sdiff -b -B -l -w 200 '

VIM="/usr/bin/vim"
if [ -x "${VIM}" ] ; then
  alias vi="${VIM} "
fi

ELVIS="/usr/bin/elvis"
if [ -x "${ELVIS}" ] ; then
  alias vi="${ELVIS} -G termcap "
  alias jelvis='_JELVIS_FILES="${*}"; /usr/bin/elvis ${_JELVIS_FILES} '
fi

alias eclipse='/export/eclipse/helios_sr2/eclipse/eclipse'

#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
# mercurial (hg) alias go here...
#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
alias hg-pull='hg pull ssh://jlagas-admin@hg.int//home/rfiles/'
alias hg-push='hg push ssh://jlagas-admin@hg.int//home/rfiles/'

#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
# Home Systems
#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
alias goserver="ssh -X root@server.lan"
alias godns="ssh -X root@dns.lan"
alias godhcp="ssh -X root@dhcp.lan"
alias goimap="ssh -X root@imap.lan"
alias goldap="ssh -X root@ldap.lan"


#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
# This is for SunOS
#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
if [ "${_OS}" = "SunOS" ]; then
  TERM=xterm
fi

#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
# this is the PATH section
#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
PATHELEMS=" "
PATHELEMS="${PATHELEMS} /bin /usr/bin /usr/local/bin "
PATHELEMS="${PATHELEMS} /sbin /usr/sbin /usr/local/sbin"
PATHELEMS="${PATHELEMS} /usr/X11R6/bin /usr/bin/X11 /usr/games"
PATHELEMS="${PATHELEMS} ${HOME}/PROGRAMS ${HOME}/_JTOOLS "
if [ "${_OS}" = "HP-UX" ]; then
 PATHELEMS="${PATHELEMS} /usr/contrib/bin /usr/contrib/bin/X11"
fi
if [ "${_OS}" = "HP-UX" -o "${_OS}" = "SunOS" ]; then
  PATHELEMS="${PATHELEMS} /usr/dt/bin /usr/ccs/bin"
fi
if [ "${_OS}" = "SunOS" ]; then
  PATHELEMS="${PATHELEMS} /usr/ucb /usr/openwin/bin /h/COE/bin "
fi


PATH="${PATH}"
for ITEM in ${PATHELEMS}
do
  # echo ${PATH} | ${_GREP} ${ITEM} >&-
  ${_ECHO} "${PATH}" | ${_GREP} ${ITEM} > /dev/null
  if [ $? -eq 1 ] ; then
     if [ -d ${ITEM} ] ; then
        PATH="${PATH}:${ITEM}"
     fi
  fi
done   
export PATH

### this is for my man pages
if [ "${_OS}" = "Linux" ]; then
  export PAGER='/usr/bin/less -Xsi'
fi


#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
# this is the PYTHON section
#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
PYTHONSTARTUP=/home/jlagas/.pythonrc
export PYTHONSTARTUP


